
//
//  UIBarButtonItem-Extension.swift
//  CXWeibo
//
//  Created by 陈旭 on 16/9/11.
//  Copyright © 2016年 陈旭. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    convenience init(imageName: String){
        let btn = UIButton()
        btn.setImage(UIImage(named: imageName), forState: .Normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        btn.sizeToFit()
        
        self.init(customView : btn)
    }
}
